﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Media;

namespace BrainTechLLC.ImageOperatorsNonAForgeDependent
{
    public class BasicImageSource : BasicBitmap
    {
        protected ImageSource _ImageSource;
        protected double _ImageSourceWidth;
        protected double _ImageSourceHeight;

        public virtual ImageSource ImageSource
        {
            get { return _ImageSource; }
            set
            {
                if (_ImageSource != value)
                {
                    _ImageSource = value;
                    OnPropertyChanged("ImageSource");
                }
            }
        }

        public virtual double ImageSourceWidth
        {
            get { return _ImageSourceWidth; }
            set
            {
                if (_ImageSourceWidth != value)
                {
                    _ImageSourceWidth = value;
                    OnPropertyChanged("ImageSourceWidth");
                }
            }
        }

        public virtual double ImageSourceHeight
        {
            get { return _ImageSourceHeight; }
            set
            {
                if (_ImageSourceHeight != value)
                {
                    _ImageSourceHeight = value;
                    OnPropertyChanged("ImageSourceHeight");
                }
            }
        }

        public void FreeImageSource()
        {
            ImageSource = null;
            ImageSourceWidth = 0;
            ImageSourceHeight = 0;
        }
    }
}
